/*
 * DietyList.java
 *
 * Created on October 23, 2007, 12:43 PM
 */

package jia.editor.lists;

import jia.editor.EditorMain;
import jia.tools.PanelSwapper;

/**
 *
 * @author  estell
 */
public class pnl_DietyList extends javax.swing.JPanel {
    
    /** Creates new form DietyList */
    public pnl_DietyList() {
        initComponents();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pop_DietyListContext = new javax.swing.JPopupMenu();
        mnu_DietyListEdit = new javax.swing.JMenuItem();
        mnu_DietyListDelete = new javax.swing.JMenuItem();
        sp_DietyListMain = new javax.swing.JSplitPane();
        scrl_DietyListTable = new javax.swing.JScrollPane();
        tbl_DietyList = new javax.swing.JTable();
        scrl_DietyListDetails = new javax.swing.JScrollPane();
        txt_DietyListDetails = new javax.swing.JTextPane();
        btn_DietyListAdd = new javax.swing.JButton();
        btn_DietyListEdit = new javax.swing.JButton();
        btn_DietyListDelete = new javax.swing.JButton();
        btn_DietyListCancel = new javax.swing.JButton();

        mnu_DietyListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/pencil.png"))); // NOI18N
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("jia_ui/images/formUI"); // NOI18N
        mnu_DietyListEdit.setText(bundle.getString("btn_Edit_lbl")); // NOI18N
        mnu_DietyListEdit.setToolTipText(bundle.getString("btn_Edit")); // NOI18N
        mnu_DietyListEdit.setActionCommand(bundle.getString("btn_Edit_lbl")); // NOI18N
        mnu_DietyListEdit.setLabel(bundle.getString("btn_Edit_lbl")); // NOI18N
        mnu_DietyListEdit.setName(bundle.getString("btn_Edit_lbl")); // NOI18N
        pop_DietyListContext.add(mnu_DietyListEdit);
        mnu_DietyListEdit.getAccessibleContext().setAccessibleName(bundle.getString("btn_Edit_lbl")); // NOI18N
        mnu_DietyListEdit.getAccessibleContext().setAccessibleDescription(bundle.getString("btn_Edit")); // NOI18N

        mnu_DietyListDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/delete.png"))); // NOI18N
        mnu_DietyListDelete.setText(bundle.getString("btn_Delete_lbl")); // NOI18N
        mnu_DietyListDelete.setToolTipText(bundle.getString("btn_Delete")); // NOI18N
        mnu_DietyListDelete.setActionCommand(bundle.getString("btn_Delete_lbl")); // NOI18N
        mnu_DietyListDelete.setLabel(bundle.getString("btn_Delete_lbl")); // NOI18N
        mnu_DietyListDelete.setName(bundle.getString("btn_Delete_lbl")); // NOI18N
        pop_DietyListContext.add(mnu_DietyListDelete);
        mnu_DietyListDelete.getAccessibleContext().setAccessibleName(bundle.getString("btn_Delete_lbl")); // NOI18N
        mnu_DietyListDelete.getAccessibleContext().setAccessibleDescription(bundle.getString("btn_Delete")); // NOI18N

        setPreferredSize(new java.awt.Dimension(800, 580));

        sp_DietyListMain.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), bundle.getString("title_Dieties"), javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.BELOW_TOP)); // NOI18N
        sp_DietyListMain.setDividerLocation(400);
        sp_DietyListMain.setDividerSize(7);
        sp_DietyListMain.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        sp_DietyListMain.setLastDividerLocation(400);
        sp_DietyListMain.setOneTouchExpandable(true);
        sp_DietyListMain.setPreferredSize(new java.awt.Dimension(642, 558));

        tbl_DietyList.setComponentPopupMenu(pop_DietyListContext);
        tbl_DietyList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Name", "Alignment", "Governing Class", "Enabled"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        scrl_DietyListTable.setViewportView(tbl_DietyList);

        sp_DietyListMain.setTopComponent(scrl_DietyListTable);

        txt_DietyListDetails.setEditable(false);
        scrl_DietyListDetails.setViewportView(txt_DietyListDetails);

        sp_DietyListMain.setRightComponent(scrl_DietyListDetails);

        btn_DietyListAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/add.png"))); // NOI18N
        btn_DietyListAdd.setText(bundle.getString("btn_Add_lbl")); // NOI18N
        btn_DietyListAdd.setToolTipText(bundle.getString("btn_Add")); // NOI18N
        btn_DietyListAdd.setActionCommand(bundle.getString("btn_Add_lbl")); // NOI18N
        btn_DietyListAdd.setLabel(bundle.getString("btn_Add_lbl")); // NOI18N
        btn_DietyListAdd.setName(bundle.getString("btn_Add_lbl")); // NOI18N
        btn_DietyListAdd.setPreferredSize(new java.awt.Dimension(132, 30));
        btn_DietyListAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DietyListAddActionPerformed(evt);
            }
        });

        btn_DietyListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/pencil.png"))); // NOI18N
        btn_DietyListEdit.setText(bundle.getString("btn_Edit_lbl")); // NOI18N
        btn_DietyListEdit.setToolTipText(bundle.getString("btn_Edit")); // NOI18N
        btn_DietyListEdit.setActionCommand(bundle.getString("btn_Edit_lbl")); // NOI18N
        btn_DietyListEdit.setLabel(bundle.getString("btn_Edit_lbl")); // NOI18N
        btn_DietyListEdit.setName(bundle.getString("btn_Edit_lbl")); // NOI18N
        btn_DietyListEdit.setPreferredSize(new java.awt.Dimension(132, 30));

        btn_DietyListDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/delete.png"))); // NOI18N
        btn_DietyListDelete.setText(bundle.getString("btn_Delete_lbl")); // NOI18N
        btn_DietyListDelete.setToolTipText(bundle.getString("btn_Delete")); // NOI18N
        btn_DietyListDelete.setActionCommand(bundle.getString("btn_Delete_lbl")); // NOI18N
        btn_DietyListDelete.setLabel(bundle.getString("btn_Delete_lbl")); // NOI18N
        btn_DietyListDelete.setName(bundle.getString("btn_Delete_lbl")); // NOI18N
        btn_DietyListDelete.setPreferredSize(new java.awt.Dimension(132, 30));

        btn_DietyListCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jia_ui/images/door_out.png"))); // NOI18N
        btn_DietyListCancel.setText(bundle.getString("btn_Cancel_lbl")); // NOI18N
        btn_DietyListCancel.setToolTipText(bundle.getString("btn_Cancel")); // NOI18N
        btn_DietyListCancel.setActionCommand(bundle.getString("btn_Cancel_lbl")); // NOI18N
        btn_DietyListCancel.setLabel(bundle.getString("btn_Cancel_lbl")); // NOI18N
        btn_DietyListCancel.setName(bundle.getString("btn_Cancel_lbl")); // NOI18N
        btn_DietyListCancel.setPreferredSize(new java.awt.Dimension(132, 30));
        btn_DietyListCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DietyListCancelActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(sp_DietyListMain, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                        .add(btn_DietyListEdit, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(btn_DietyListDelete, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(btn_DietyListCancel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .add(btn_DietyListAdd, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(layout.createSequentialGroup()
                        .add(21, 21, 21)
                        .add(btn_DietyListAdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(btn_DietyListEdit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(btn_DietyListDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(btn_DietyListCancel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(sp_DietyListMain, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btn_DietyListAdd.getAccessibleContext().setAccessibleName(bundle.getString("btn_Add_lbl")); // NOI18N
        btn_DietyListAdd.getAccessibleContext().setAccessibleDescription(bundle.getString("btn_Add")); // NOI18N
        btn_DietyListEdit.getAccessibleContext().setAccessibleName(bundle.getString("btn_Edit_lbl")); // NOI18N
        btn_DietyListEdit.getAccessibleContext().setAccessibleDescription(bundle.getString("btn_Edit")); // NOI18N
        btn_DietyListDelete.getAccessibleContext().setAccessibleName(bundle.getString("btn_Delete_lbl")); // NOI18N
        btn_DietyListDelete.getAccessibleContext().setAccessibleDescription(bundle.getString("btn_Delete")); // NOI18N
        btn_DietyListCancel.getAccessibleContext().setAccessibleName(bundle.getString("btn_Cancel_lbl")); // NOI18N
        btn_DietyListCancel.getAccessibleContext().setAccessibleDescription(bundle.getString("btn_Cancel")); // NOI18N
    }// </editor-fold>//GEN-END:initComponents

    private void btn_DietyListCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DietyListCancelActionPerformed
        PanelSwapper.swap(EditorMain.p_defaultAdminPanel, this); 
    }//GEN-LAST:event_btn_DietyListCancelActionPerformed

	private void btn_DietyListAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DietyListAddActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_btn_DietyListAddActionPerformed
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btn_DietyListAdd;
    private javax.swing.JButton btn_DietyListCancel;
    private javax.swing.JButton btn_DietyListDelete;
    private javax.swing.JButton btn_DietyListEdit;
    private javax.swing.JMenuItem mnu_DietyListDelete;
    private javax.swing.JMenuItem mnu_DietyListEdit;
    private javax.swing.JPopupMenu pop_DietyListContext;
    private javax.swing.JScrollPane scrl_DietyListDetails;
    private javax.swing.JScrollPane scrl_DietyListTable;
    private javax.swing.JSplitPane sp_DietyListMain;
    private javax.swing.JTable tbl_DietyList;
    private javax.swing.JTextPane txt_DietyListDetails;
    // End of variables declaration//GEN-END:variables
    
}
